package com.situ.boot.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "advertisement", schema = "brcc", catalog = "")
public class AdvertisementEntity {
    private int id;
    private String name;
    private String image;
    private String url;
    private String isflag;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "image")
    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    @Basic
    @Column(name = "url")
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Basic
    @Column(name = "isflag")
    public String getIsflag() {
        return isflag;
    }

    public void setIsflag(String isflag) {
        this.isflag = isflag;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AdvertisementEntity that = (AdvertisementEntity) o;
        return id == that.id &&
                Objects.equals(name, that.name) &&
                Objects.equals(image, that.image) &&
                Objects.equals(url, that.url) &&
                Objects.equals(isflag, that.isflag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, image, url, isflag);
    }
}
